#include "equation.h"
void read(float& ,float&,float &);

int main() {
    float a,b,c;
    cout << "this is a program for ax2 + bx +c = 0" << endl;
    for(;;) {
        read(a,b,c);
        if (a == 0) return 0;
        FindRoot obj(a,b,c);
        obj.find();
        obj.display();
    }
    return 0;
}

void read(float& a,float& b,float& c) {
    cout << "please input a:";
    cin >> a;
    if (a == 0) {
        getchar();
        return;
    }
    cout << "please input b:";
    cin >> b;
    cout << "please input c:";
    cin >> c;

}
